package com.ysd.zytj.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ysd.zytj.dao.IReadRoomDao;
import com.ysd.zytj.model.ReadRoom;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("readroom")
@Api(tags = "资源室管理模块")
public class ReadRoomController {

	@Resource
	private IReadRoomDao readRoomDao;
	
	@ApiOperation(value = "查询",notes = "查询资源室")
	@GetMapping
	public List<ReadRoom> findAll() {
		return readRoomDao.findAll();
	}
	
	@ApiOperation(value = "保存",notes = "增删改")
	@PostMapping
	public String save(ReadRoom r) {
		readRoomDao.save(r);
		return "success";
	}
	
}
